<include file="public:header" />
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <include file="Public:sidebar" />
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        所有文章
                        <small><a href="{:U('create')}">添加文章</a></small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                        <li class="active">文章列表</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">文章列表</h3>
                                </div><!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="posts-list" class="table table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th>ID</th>
                                                <th>标题</th>
                                                <th>状态</th>
                                                <th>分类</th>
                                                <th>发布时间</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <foreach name="posts" item="post" key="key" >
                                            <tr>
                                                <td>{$post.id}</td>
                                                <td>{$post.title}</td>
                                                <td>{$post.status}</td>
                                                <td>{$post.category_name}</td>
                                                <td>{$post.created_at|date="Y-m-d",###}</td>
                                                <td><div class="btn-group">
                                                    <a class="btn btn-primary btn-sm" href="{:U('edit',array('id'=>$post['id']))}">编辑</a>
                                                    <form style="display:inline;" action="{:U('delete',array('id'=>$post['id']))}" method='post' >
                                                        <input type="submit" class="btn btn-danger btn-sm" value="删除">
                                                    </form>
                                                </div></td>
                                            </tr>
                                            </foreach>
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <th>ID</th>
                                                <th>标题</th>
                                                <th>状态</th>
                                                <th>分类</th>
                                                <th>发布时间</th>
                                                <th>操作</th>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>
                    </div>
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
<script src="__ADMINSTYLE__/js/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
<script src="__ADMINSTYLE__/js/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function() {
        $('#posts-list').dataTable({
            "bPaginate": true,
            "bLengthChange": false,
            "bFilter": false,
            "bSort": true,
            "bInfo": true,
            "bAutoWidth": false
        });
    });
</script>


<include file="Public:footer" />